<SCRIPT LANGUAGE="JavaScript">  
    function open_win(id)
    {
        window.open('preview_resume/'+id,"_blank","toolbar=no, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, top=100, left=100, width=850, height=600");
    }            
</SCRIPT>

<?php
echo "<table class='table_resume'><tr>";
    echo "<td valign='top' width='260px'>";
    echo $this->element('menu_resume'); 
    echo "</td>";
    echo "<td class='pemisah'></td>";
    echo "<td valign='top'>";
    echo "<div class='form'>";
    echo "<h2> Resume </h2>";
    echo "<hr color='#2A7EF7'>";    
    
    $resume =  $this->requestAction(array('controller'=>'resumes','action'=>'get_data'));
    $complete_personal = $this->requestAction(array('controller'=>'jobseekers','action'=>'complete_personal'));

    if($resume['Resume']['academic_id']!=0)
    { $complete_summary = true; }
    else
    { $complete_summary = false; }

    if( $complete_summary && $complete_personal)
    { $complete = true; }
    else
    { $complete = false; }
    
    if($complete)
    {
        echo ":. Lihat hasil print <a href='Javascript:open_win(".$_SESSION['User']['id'].")'>[ Here ]</a>";
        echo $this->element('resume',array('jobseeker_id'=>$_SESSION['User']['id']));
    }
    else
    {
        echo ":. <span class='red'>Warning!!!</span> Untuk membuat resume online pada ITJobz.com, Anda harus melengkapi ketersediaan <b>Require Section</b>";
        if(!$complete_personal)
        {  echo "<br>&nbsp &nbsp &nbsp * "; echo $html->link('[ Personal Detail ]',array('controller'=>'jobseekers','action'=>'personal_detail')); }
       
        if(!$complete_summary)
        {  echo "<br>&nbsp &nbsp &nbsp * "; echo $html->link('[ Summary Resume ]',array('controller'=>'resumes','action'=>'summary')); }
        
    }

        echo "</div>";
    echo "</td>";
    
echo "</tr></table>";  
?>